package com.huadragon.marathondao.dao.impl;





import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.huadragon.marathondao.base.BaseDao;
import com.huadragon.marathondao.dao.inter.IAccountInfoDao;
import com.huadragon.marathondao.dao.inter.IRoleInfoDao;
import com.huadragon.marathonentity.common.page.PagerModel;
import com.huadragon.marathonentity.servicedomain.RoleInfoDomain;

@Repository
public class RoleInfoDaoImpl implements IRoleInfoDao {
	@Autowired
	private BaseDao dao;

	public PagerModel selectPageList(RoleInfoDomain e) {
		return dao.selectPageList("RoleInfo.selectPageList",
				"RoleInfo.selectPageCount", e);
	}
	
	public RoleInfoDomain selectById(int id) {
		// TODO Auto-generated method stub
		return null;
	}

	public List selectList(RoleInfoDomain e) {
		return dao.selectList("RoleInfo.selectList", e);
	}

	public RoleInfoDomain selectOne(RoleInfoDomain e) {
		return (RoleInfoDomain) dao.selectOne("RoleInfo.selectOne", e);
	}

	public int delete(RoleInfoDomain e) {
		return dao.delete("AccountInfo.delete", e);
	}

	public int update(RoleInfoDomain e) {
		return dao.update("RoleInfo.update", e);
	}

	public int deletes(int[] ids) {
		RoleInfoDomain e = new RoleInfoDomain();
		for (int i = 0; i < ids.length; i++) {
			e.setId(ids[i]);
			delete(e);
		}
		return 0;
	}

	public int insert(RoleInfoDomain e) {
		return dao.insert("RoleInfo.insert", e);
	}

	public int deleteById(int id) {
		return dao.delete("AccountInfo.deleteById", id);
	}

	public int selectCount(RoleInfoDomain e) {
		return dao.getCount("AccountInfo.selectCount", e);
	}

	public int insertList(List<RoleInfoDomain> list) {
		// TODO Auto-generated method stub
		return 0;
	}
	
	
}
